-- GENERATED SPELL FOR [Blackrock Shadowcaster] --


function spell0_436(pUnit, Event) --@Banish,n/a--
pUnit:FullCastSpellOnTarget(8994,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_436', 16000, 1)
end

function spell1_436(pUnit, Event) --@Demon Armor,Self--
pUnit:FullCastSpellOnTarget(13787,pUnit)
pUnit:RegisterEvent('Sorts_436', 0, 1)
end

function spell2_436(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(3019,pUnit)
pUnit:RegisterEvent('Sorts_436', 15000, 1)
end

function spell3_436(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_436', 3000, 1)
end

function spell4_436(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(11639,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_436', 18000, 1)
end

function Sorts_436(pUnit, Event)
local choix_sorts_436 = math.random(0, 4)
if choix_sorts_436 == 0 then
pUnit:RegisterEvent('spell0_436', 1, 1)
end
if choix_sorts_436 == 1 then
pUnit:RegisterEvent('spell1_436', 1, 1)
end
if choix_sorts_436 == 2 then
pUnit:RegisterEvent('spell2_436', 1, 1)
end
if choix_sorts_436 == 3 then
pUnit:RegisterEvent('spell3_436', 1, 1)
end
if choix_sorts_436 == 4 then
pUnit:RegisterEvent('spell4_436', 1, 1)
end
end

function mob436_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_436', math.random(1500, 3000), 1)
end

function mob436_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob436_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob436_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(436, 1, 'mob436_Action')
RegisterUnitEvent(436, 2, 'mob436_Leave')
RegisterUnitEvent(436, 3, 'mob436_Kill')
RegisterUnitEvent(436, 4, 'mob436_Die')
